
/**
* @module typeChecker
* @author: Hjava
* @description: 用来判断数据类型
* @since: 2018-10-09 16:42:46
*/
Object.defineProperty(exports, "__esModule", { value: true });
var TypeChecker = /** @class */ (function () {
    function TypeChecker() {
        this._type = '';
    }
    TypeChecker.prototype.check = function (data) {
        this._type = Object.prototype.toString.call(data);
    };
    TypeChecker.prototype.isUndefined = function (data) {
        this.check(data);
        return this._type === '[object Undefined]';
    };
    TypeChecker.prototype.isNull = function (data) {
        this.check(data);
        return this._type === '[object Null]';
    };
    TypeChecker.prototype.isBoolean = function (data) {
        this.check(data);
        return this._type === '[object Boolean]';
    };
    TypeChecker.prototype.isNumber = function (data) {
        this.check(data);
        return this._type === '[object Number]';
    };
    TypeChecker.prototype.isString = function (data) {
        this.check(data);
        return this._type === '[object String]';
    };
    TypeChecker.prototype.isArray = function (data) {
        this.check(data);
        return this._type === '[object Array]';
    };
    TypeChecker.prototype.isObject = function (data) {
        this.check(data);
        return this._type === '[object Object]';
    };
    TypeChecker.prototype.isFunction = function (data) {
        this.check(data);
        return this._type === '[object Function]';
    };
    TypeChecker.prototype.isRegex = function (data) {
        this.check(data);
        return this._type === '[object RegExp]';
    };
    TypeChecker.prototype.isDate = function (data) {
        this.check(data);
        return this._type === '[object Date]';
    };
    return TypeChecker;
}());
exports.default = new TypeChecker();


//# sourceURL=webpack://MTDX/./src/core/utils/typeChecker.ts?